<@override name="link">
<link href="${base}/resources/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
</@override>
<@override name="body">
    <body class="gray-bg">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>人员管理</h5>
                    <div class="ibox-tools">
                        <a href="add.html" class="dropdown-toggle" title="添加人员">
                            <i class="fa fa-arrows"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="index.html">
                        <div class="row">
                            <div class="col-sm-9 m-b-xs"></div>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="hidden" name="pageNumber" id="pageNumber" value="${pageable.pageNumber}">
                                    <input type="hidden" name="pageSize" id="pageSize" value="${pageable.pageSize}">
                                    <input type="text" placeholder="人员" name="key" value="<#if key??>${key}</#if>" class="input-sm form-control">
                                    <span class="input-group-btn">
                                        <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <#if check??>
                                <td>
                                </td>
                            </#if>
                                <td>编号</td>
                                <td>头像</td>
                                <td>用户名</td>
                                <td>姓名</td>
                                <td>联系方式</td>
                                <td>性别</td>
                                <td>部门</td>
                                <td>职位</td>
                                <td>入职时间</td>
                                <td>操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            <#list page.contents as user>
                                <tr>
                                    <#if check??>
                                    <td>
                                        <div class="<#if check=='ok'>radio<#else>checkbox</#if> i-checks">
                                            <input type="<#if check=='ok'>radio<#else>checkbox</#if>" name="id" data-id="${user.id}" data-name="${user.info.realName}">
                                        </div>
                                    </td>
                                </#if>
                                    <td>${user.id}</td>
                                    <td>
                                        <#if user.info.portrait??>
                                            <img src="${base}/${user.info.portrait}" width="20" alt="">
                                        </#if>
                                    </td>
                                    <td>${user.username}</td>
                                    <td>
                                        <#if user.info ??>
                                            ${user.info.realName}
                                        </#if>
                                    </td>
                                    <td>
                                        ${user.phone}
                                    </td>
                                    <td>
                                        <#if user.info??>
                                            <#if user.info.gender==0>
                                                <span class="text text-success">
                                                    <i class="fa fa-male"></i>
                                                </span>
                                                <#else>
                                                <span class="text text-danger">
                                                    <i class="fa fa-female"></i>
                                                </span>
                                            </#if>
                                        </#if>
                                    </td>
                                    <td>
                                        ${user.info.department.name}
                                    </td>
                                    <td>
                                        ${user.info.position.name}
                                    </td>
                                    <td>
                                        <#if user.info.jobTime??>
                                            <#setting datetime_format="yyyy年MM月dd"/>
                                            ${user.info.jobTime?number_to_datetime}
                                        </#if>
                                    </td>
                                    <td>
                                        <a href="javascript:;" class="btn btn-xs btn-primary" title="编辑">
                                            <i class="fa fa-edit"></i>
                                        </a>
                                        <a href="javascript:;" class="btn btn-xs btn-primary" title="删除" data-id="${user.id}">
                                            <i class="fa fa-times-circle"></i>
                                        </a>
                                        <a href="javascript:;" class="btn btn-xs btn-primary" title="设置" data-id="${user.id}">
                                            <i class="fa fa-paper-plane"></i>
                                        </a>
                                        <a href="javascript:;" class="btn btn-xs btn-primary" title="修改密码" data-id="${user.id}">
                                            <i class="fa fa-lock"></i>
                                        </a>
                                    </td>
                                </tr>
                            </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </body>
</@override>
<@override name="script">
<script type="text/javascript" src="${base}/resources/admin/js/plugins/iCheck/icheck.min.js"></script>
<script type="text/javascript">
    Common.checkbox();
</script>
</@override>
<@extends name="../base/main.html"/>